﻿<h1>Books</h1>
<ul data-template="book-template" data-bind="source: books">
</ul>

<script type="text/x-kendo-template" id="book-template">
    <div>
        <strong>Title: </strong>
        <span>#= title # </span>
        <strong>Author: </strong>
        <span>#= author # </span>
        <span>Genre: </span>
        <span>#= genre # </span>
        <span>Pages: </span>
        <span>#= pages # </span>
        <strong>RentCost: $</strong>
        <span>#= rentCost # </span>
    # if(isAvailable == "True") { #
        <button data-bind="click: rentBook" data-bookId="#= id #">Rent the book</button>
    # } #
    </div>
</script>